import { Component } from "vue";

export interface QueryDataList {
  id: number;
  name: string;
  type: string | string[];
  label: string;
  suffix?: string;
  isVisible?: boolean;
  isFour?: boolean;
  component?: Component;
}

export interface MarkDataList extends QueryDataList {
  toolType: string;
  lesionList?: NidusItem[];
  isVisible: boolean;
  lesionValue?: string;
  isSecondVisible?: boolean;
}

export interface ToolBarState {
  currentItem: number;
  queryToolList: QueryDataList[];
  markToolList: MarkDataList[];
  lesionList: NidusItem[];
}

export interface NidusItem {
  id: number;
  name: string;
  lesion: string;
  eyeStatus: boolean;
  color: string;
  seriesList: ShowComponentObj;
  isSave?: boolean;
}

export interface ShowComponentObj {
  formId: number;
  form: {
    [x: string]: any;
  };
  formOptions: FormOptionsItem[];
}

export interface FormOptionsItem {
  id: number;
  acrId?: any;
  componentId: number;
  title: string;
  field: string;
  type: string;
  data?: DataItem[];
  parameter?: {
    [x: string]: string;
  };
  required: boolean;
}

export interface DataItem {
  value: string;
  label: string;
  children: DataItem[];
}

export interface CallBack {
  currentItem: QueryDataList | MarkDataList;
  [x: string]: any
}